package com.lagou.edu.homework.controller;

import com.lagou.edu.homework.model.Resume;
import com.lagou.edu.homework.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

/**
 * @program: stage-3-module-2
 * @description:
 * @author: zhangxiaoyang
 * @date: 2020-08-25 23:04
 **/
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @GetMapping("/{id}")
    public Resume getById(@PathVariable("id") Integer id) throws SQLException {
        return demoService.getById(id);
    }
}
